@import './normalize.css';
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Montserrat:wght@100;200;300;400;500;600;700&family=Old+Standard+TT:wght@400;700&display=swap');

:root {
    --primary-background: #15202b;
    --secondary-background: #192734;
    --accent-color: #64ffda;
    --text-primary: #ffffff;
    --text-secondary: #a8dadc;
    --border-color: #3b4a5b;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: Montserrat;
    color: var(--text-secondary);
    background-color: var(--primary-background);
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 80%;
    padding: 20px;
    margin: 0 auto;
    background-color: var(--secondary-background);
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    color: var(--accent-color);
}

h1 {
    font-weight: 400;
    font-size: 2.5rem;
}

label {
    display: block;
    margin-bottom: 8px;
}

input {
    padding: 12px;
    margin-bottom: 16px;
    outline: none;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: var(--primary-background);
    box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 20px;
    transition: box-shadow 0.1s cubic-bezier(.79,.21,.06,.81), opacity 0.1s cubic-bezier(.79,.21,.06,.81);
}

input::placeholder {
    color: var(--text-secondary);
}

button {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background-color: var(--accent-color);
    color: var(--primary-background);
    font-size: 1rem;
    line-height: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: darken(var(--accent-color), 10%);
}

.wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

main {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    background-color: var(--secondary-background);
    box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.1);
}

header, footer {
    padding: 15px 0;
    text-align: center;
    color: var(--text-secondary);
}

.content > * {
    padding: 15px;
}

.content header {
    position: relative;
    border-bottom: 2px solid var(--border-color);
}

.content header h2 {
    font-weight: 600;
    color: var(--accent-color);
}

.bold {
    font-weight: 600;
}

.buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

button.restart, button.settings {
    width: 40px;
    height: 40px;
    background-color: var(--primary-background);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

button.restart {
    background-image: url('../img/refresh.svg');
}

button.settings {
    background-image: url('../img/settings.svg');
}

button.settings.active {
    box-shadow: 0px 0px 0px 0px var(--primary-background),
    0px 0px 0px 0px var(--primary-background),
    0px 0px 0px 0px var(--border-color),
    0px 0px 0px 0px var(--border-color),
    inset -7px -7px 20px 0px var(--primary-background),
    inset -4px -4px 5px 0px var(--primary-background),
    inset 7px 7px 20px 0px var(--border-color),
    inset 4px 4px 5px 0px var(--border-color);
}

.settings-menu {
    display: none;
    padding: 15px;
    position: absolute;
    top: 100%; /* Изменил значение top на 100% */
    right: 0;
    z-index: 1; /* Изменил значение z-index на 1 */
    border-radius: 8px;
    background-color: var(--secondary-background);
    box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.2);
    transform: translate(-50%, 0); /* Добавил новое свойство transform */
}

.settings-menu.visible {
    display: block;
}

.attempts-items {
    max-height: 50vh;
    overflow: auto;
}

.attempts-items > div {
    padding: 15px 0;
    border-bottom: 2px solid var(--border-color);
}

.hint {
    display: none;
    padding: 15px 30px;
    position: absolute;
    bottom: 15px;
    right: 15px;
    border-radius: 8px;
    background-color: var(--accent-color);
    color: var(--secondary-background);
    box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.2);
    transition: visibility 0.3s ease-out, opacity 0.3s ease-out;
}

.hint.visible {
    display: block;
}

@media (max-width: 576px) {
    [class*="container"] {
        padding: 0 15px;
        max-width: none;
    }

    button {
        background-size: 60%;
    }

    main .container .content {
        margin: 15px;
    }

    .message {
        padding-right: 0;
    }

    .buttons {
        right: 10px;
    }

    .settings-menu {
        right: 50%;
        transform: translate(50%, 0);
    }

    .hint {
        padding: 10px 15px;
        font-size: 12px;
    }

    button.settings, button.restart {
        position: static;
        margin-top: 10px;
    }
}